@import 'tailwindcss';

@custom-variant dark (&:is(.dark *));
/* @custom-variant dark (&:where(.dark, .dark *)); */

@theme {
  --color-neon-green: #d1ef53;
  --color-dark-green: #0e281c;
  --color-background: var(--background);
  --color-foreground: var(--foreground);
  --color-secondary-background: var(--secondary-background);

  --color-card: hsl(var(--card));
  --color-card-foreground: hsl(var(--card-foreground));

  --color-popover: hsl(var(--popover));
  --color-popover-foreground: hsl(var(--popover-foreground));

  --color-primary: hsl(var(--primary));
  --color-primary-foreground: hsl(var(--primary-foreground));

  --color-secondary: hsl(var(--secondary));
  --color-secondary-foreground: hsl(var(--secondary-foreground));

  --color-muted: hsl(var(--muted));
  --color-muted-foreground: hsl(var(--muted-foreground));

  --color-accent: hsl(var(--accent));
  --color-accent-foreground: hsl(var(--accent-foreground));

  --color-destructive: hsl(var(--destructive));
  --color-destructive-foreground: hsl(var(--destructive-foreground));

  --color-border: hsl(var(--border));
  /* --color-border: #d8d8d8; */
  --color-input: hsl(var(--input));
  --color-ring: hsl(var(--ring));

  --color-chart-1: hsl(var(--chart-1));
  --color-chart-2: hsl(var(--chart-2));
  --color-chart-3: hsl(var(--chart-3));
  --color-chart-4: hsl(var(--chart-4));
  --color-chart-5: hsl(var(--chart-5));

  --radius-lg: var(--radius);
  --radius-md: calc(var(--radius) - 2px);
  --radius-sm: calc(var(--radius) - 4px);
}

/*
  The default border color has changed to `currentColor` in Tailwind CSS v4,
  so we've added these compatibility styles to make sure everything still
  looks the same as it did with Tailwind CSS v3.

  If we ever want to remove these styles, we need to add an explicit border
  color utility to any element that depends on these defaults.
*/
@layer base {
  *,
  ::after,
  ::before,
  ::backdrop,
  ::file-selector-button {
    border-color: var(--color-gray-200, currentColor);
  }
}

@layer utilities {
  html {
    scroll-behavior: smooth;
  }

  .typing_dot {
    animation: typing 1s infinite;
  }

  @keyframes typing {
    0% {
      opacity: 0;
      scale: 0.5;
    }
    50% {
      opacity: 1;
      scale: 1;
    }
    100% {
      opacity: 0;
      scale: 0.5;
    }
  }

  .typing_dot:nth-child(2) {
    animation-delay: 0.2s;
  }

  .typing_dot:nth-child(3) {
    animation-delay: 0.4s;
  }

  .disclaimer-text {
    font-size: 0.8rem;
    opacity: 0.7;
    color: hsl(var(--foreground));
  }
}

@layer base {
  :root {
    --background: #f3f1ee;
    --secondary-background: #e7e4df;
    --foreground: #000000;
    --secondary: 0, 0%, 98%; /* #FAFAFA */
    --accent: 0, 0%, 89%; /* #E2E2E2 */
    --muted: 0, 0%, 96%; /* #f5f5f5 */
    --muted-foreground: 0, 0%, 45%; /* #737373 */
    --popover: 0, 0%, 100%; /* #ffffff */
    --popover-foreground: 0, 0%, 0%; /* #000000 */
    --primary: 84, 78%, 64%; /* #d1ef53 */
    --primary-foreground: 146, 84%, 11%; /* #0e281c */
    --card: 0, 0%, 100%; /* #ffffff */
    --card-foreground: 0, 0%, 0%; /* #000000 */
    --border: 0, 0%, 85%; /* #d8d8d8 */
    --input: 0, 0%, 100%; /* #ffffff */
    --ring: 84, 78%, 64%; /* #d1ef53 */
    font-size: 87.5%;
  }
  .dark {
    --background: #191919;
    --secondary-background: #2a2a2a;
    --foreground: #f3f1ed;
    --secondary: 0, 0%, 0%; /* #000000 */
    --accent: 0, 0%, 22%; /* #383838 */
    --muted: 0, 0%, 20%; /* #333333 */
    --muted-foreground: 0, 0%, 65%; /* #a6a6a6 */
    --popover: 0, 0%, 10%; /* #191919 */
    --popover-foreground: 40, 20%, 94%; /* #f3f1ed */
    --primary: 84, 78%, 64%; /* #d1ef53 */
    --primary-foreground: 146, 84%, 11%; /* #0e281c */
    --card: 0, 0%, 15%; /* #262626 */
    --card-foreground: 40, 20%, 94%; /* #f3f1ed */
    --border: 0, 0%, 20%; /* #333333 */
    --input: 0, 0%, 15%; /* #262626 */
    --ring: 84, 78%, 64%; /* #d1ef53 */
  }
}

@layer base {
  * {
    @apply border-border;
  }
  body {
    @apply bg-background text-foreground;
  }
}

button:hover {
  cursor: pointer;
}

@layer base {
  * {
    @apply border-border outline-ring/50;
  }
  body {
    @apply bg-background text-foreground;
  }
}

/* Custom scrollbar styling */
@layer utilities {
  /* Scrollbar always reserves space, but only visible on hover */
  .scrollbar-hover-only {
    /* Firefox - always show thin scrollbar but transparent */
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
  }
  
  .scrollbar-hover-only::-webkit-scrollbar {
    width: 6px; /* Always reserve 6px space */
  }

  .scrollbar-hover-only::-webkit-scrollbar-track {
    background: transparent;
  }

  .scrollbar-hover-only::-webkit-scrollbar-thumb {
    background-color: transparent; /* Hidden by default */
    border-radius: 3px;
    transition: background-color 0.2s ease;
  }

  /* Show scrollbar on hover */
  .scrollbar-hover-only:hover {
    scrollbar-color: rgba(156, 163, 175, 0.5) transparent; /* Firefox */
  }

  .scrollbar-hover-only:hover::-webkit-scrollbar-thumb {
    background-color: rgba(156, 163, 175, 0.5);
  }

  .scrollbar-hover-only:hover::-webkit-scrollbar-thumb:hover {
    background-color: rgba(156, 163, 175, 0.8);
  }

  /* Dark mode for hover-only scrollbar */
  .dark .scrollbar-hover-only:hover {
    scrollbar-color: rgba(75, 85, 99, 0.5) transparent; /* Firefox */
  }

  .dark .scrollbar-hover-only:hover::-webkit-scrollbar-thumb {
    background-color: rgba(75, 85, 99, 0.5);
  }

  .dark .scrollbar-hover-only:hover::-webkit-scrollbar-thumb:hover {
    background-color: rgba(75, 85, 99, 0.8);
  }
}
